package bo;

import java.util.List;
import dao.JDBCServicioDAO;

import dao.ConnectionManager;

public class Catalogo {

	private static Catalogo cat;
	
	private List<Servicio> catalogo;
	
	

	public static synchronized Catalogo getInstance() {
        if (cat == null)
            cat = new Catalogo();
        return cat;
    }

    private Catalogo() {
        catalogo = (new JDBCServicioDAO()).selectAllServicios();
    }

    public List<Servicio> getCatalogo() {
        return catalogo;
    }
	
    public List<Servicio> getDisponible(){
    	return null;
    }
    
    public void cobrarServicio(Usuario us, String IDservico){
    	
    	//us.setCredito((us.getCredito()-(new Servicio(new JDBCServicoDAO()).selectServicio(conn, (new JDBCServicoDAO()).selectServicioOID(conn, IDservicio)))).Credito));
    }
}
